#pragma once

#ifndef GRAVITY_H
#define GRAVITY_H

#include "ForceGenerator.h"

/**
 * A force generator that applies a gravitational force. One instance
 * can be used for multiple partices.
 */
class Gravity : public ForceGenerator
{
private:
	/** Holds the acceleration due to gravity. */
	D3DXVECTOR3 gravity;
public:
	/** Creates the generator with the given acceleratoin. */
	Gravity(D3DXVECTOR3 gravity) : gravity(gravity) { }
	virtual ~Gravity() { }
	/** Applies the gravitational force to the given particle. */
	virtual void updateForce(Particle* particle, float frameTime);
};

#endif